package com.lc.activiti.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * 请求配置类
 * @Title: WebSecrurityConfig
 * @Description:
 * @author: 骆超
 * @date: 2021/5/14 11:16
 */
@EnableWebSecurity
public class WebSecrurityConfig extends WebSecurityConfigurerAdapter {

    /**
     * 请求校验
     * @param http
     * @throws Exception
     */
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        //允许所有的请求通过
        http.authorizeRequests().antMatchers("/").permitAll();
        //关闭CSRF安全校验
        http.cors().and().csrf().disable();
    }

}
